﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Ceremony.API.Model
{
    /// <summary>
    /// 用户获奖记录
    /// </summary>
    public class UserPrizeRecord
    {
        public int Id { get; set; }
        /// <summary>
        /// 用户ID
        /// </summary>
        public int UserId { get; set; }
        /// <summary>
        /// 获奖ID
        /// </summary>
        public int PrizeId { get; set; }
        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsRemove { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        private UserPrizeRecord() { }

        public UserPrizeRecord(int userId,int prizeId)
        {
            this.UserId = userId;
            this.PrizeId = prizeId;
            this.CreateTime = DateTime.Now;
            this.IsRemove = false;
        }
        /// <summary>
        /// 删除
        /// </summary>
        public void Remove()
        {
            this.IsRemove = true;
        }
    }
}
